<?php

class Application_Form_Boot extends Zend_Form{

    public function init(){
        /* Form Elements & Other Definitions Here ... 
    	$this->setName("boot");
    	$this->setMethod('post');
    	
    	$this->addElement('text', 'schiffsart', array(
    			'filters'    => array('StringTrim'),
    			'validators' => array(
    					array('StringLength', false, array(0, 50)),
    			),
    			'required'   => true,
    			'label'      => 'Schiffsart: ',
    	));
    	$this->addElement('text', 'schiffsmodell', array(
    			'filters'    => array('StringTrim'),
    			'validators' => array(
    					array('StringLength', false, array(0, 50)),
    			),
    			'required'   => true,
    			'label'      => 'Schiffsmodell: ',
    	));
    	$this->addElement('text', 'breite', array(
    			'filters'    => array('StringTrim'),
    			'validators' => array(
    					array('StringLength', false, array(0, 50)),
    			),
    			'required'   => true,
    			'label'      => 'Breite (in Meter): ',
    	));
    	$this->addElement('text', 'hoehe', array(
    			'filters'    => array('StringTrim'),
    			'validators' => array(
    					array('StringLength', false, array(0, 50)),
    			),
    			'required'   => true,
    			'label'      => 'Hoehe (in Meter): ',
    	));
    	$this->addElement('text', 'rumpf', array(
    			'filters'    => array('StringTrim'),
    			'validators' => array(
    					array('StringLength', false, array(0, 50)),
    			),
    			'required'   => true,
    			'label'      => 'Rumpf: ',
    	));
    	$this->addElement('text', 'kabinenanzahl', array(
    			'filters'    => array('StringTrim'),
    			'validators' => array(
    					array('StringLength', false, array(0, 50)),
    			),
    			'required'   => true,
    			'label'      => 'Anzahl der Kabinen: ',
    	));
//     	$this->addElement('text', 'profilbild', array(
//     			'filters'    => array('StringTrim'),
//     			'validators' => array(
//     					array('StringLength', false, array(0, 50)),
//     			),
//     			'required'   => true,
//     			'label'      => 'Profilbild: ',
//     	));
    	
    	$this->addElement('submit', 'login', array(
    			'required' => false,
    			'ignore'   => true,
    			'label'    => 'Erstellen',
    	));*/
    
    	$this->setName("boot");
    	$this->setMethod('post');
    	
    	$schiffsart = new Zend_Form_Element_Text('schiffsart');
    	$schiffsart->setLabel('Schiffsart:')
    		->setOptions(array('id' => 'fname'))
    		->setRequired(true);
    	
    	$schiffsmodell = new Zend_Form_Element_Text('schiffsmodell');
    	$schiffsmodell->setLabel('Schiffsmodell:')
    		->setOptions(array('id' => 'fname'))
    		->setRequired(true);
    	
    	$breite = new Zend_Form_Element_Text('breite');
    	$breite->setLabel('Breite:')
    		->setOptions(array('id' => 'fname'))
    		->addValidator('Alnum', true)
    		->setRequired(true);
    	
    	$laenge = new Zend_Form_Element_Text('laenge');
    	$laenge->setLabel('Laenge:')
    		->setOptions(array('id' => 'fname'))
    		->addValidator('Alnum', true)
    		->setRequired(true);
    	
    	$hoehe = new Zend_Form_Element_Text('hoehe');
    	$hoehe->setLabel('Hoehe:')
    		->setOptions(array('id' => 'fname'))
    		->addValidator('Alnum', true)
    		->setRequired(true);
    	
    	$rumpf = new Zend_Form_Element_Text('rumpf');
    	$rumpf->setLabel('Tiefgang:')
    		->setOptions(array('id' => 'fname'))
    		->addValidator('Alnum', true)
    		->setRequired(true);
    	
    	$passagiere = new Zend_Form_Element_Text('passagiere');
    	$passagiere->setLabel('max. Passagieranzahl:')
	    	->setOptions(array('id' => 'fname'))
	    	->addValidator('Alnum', true)
	    	->setRequired(true);

    	$knoten = new Zend_Form_Element_Text('knoten');
    	$knoten->setLabel('max. Geschwindigkeit (in Knoten):')
	    	->setOptions(array('id' => 'fname'))
	    	->addValidator('Alnum', true)
	    	->setRequired(true);
    	 
    	$reichweite = new Zend_Form_Element_Text('reichweite');
    	$reichweite->setLabel('max. Reichweite (in Seemeilen):')
	    	->setOptions(array('id' => 'fname'))
	    	->addValidator('Alnum', true)
	    	->setRequired(true);
    	 
    	$kabinenanzahl = new Zend_Form_Element_Text('kabinenanzahl');
    	$kabinenanzahl->setLabel('Kabinenanzahl:')
    		->setOptions(array('id' => 'fname'))
    		->addValidator('Int', true)
    		->setRequired(true);

    	/*
    	$portfoliobild = new Zend_Form_Element_Text('portfoliobild');
    	$portfoliobild->setLabel('Protfoliobild:')
    		->setOptions(array('id' => 'fname'));
    	*/
    	
    	$submit = new Zend_Form_Element_Submit('submit');
    	$submit->setLabel('Abschicken')
    	->setOptions(array('class' => 'submit'));
    	
    	$this
    		->addElement($schiffsart)
    		->addElement($schiffsmodell)
    		->addElement($breite)
    		->addElement($laenge)
    		->addElement($hoehe)
    		->addElement($rumpf)
    		->addElement($passagiere)
    		->addElement($knoten)
    		->addElement($reichweite)
    		->addElement($kabinenanzahl)
//     		->addElement($profilbild)
    		->addElement($submit);
    }
}

